Go to the source code of this file.
This structure is a wrapper around a mutex and condition object and an external buffer. It is a convenience object which may be used to create synchronous MBIM APIs.
- Parameters
-
| mutex |
|
| condition |
|
| status |
- The returned MBIM transaction status.
|
| informationBuffer |
- Buffer to which the transaction response's informationBuffer will be copied.
|
| informationBufferLength |
- Set to maximum expected size in bytes of transaction response's informationBuffer. On request completion, it is set to size of transaction response's informationBuffer.
|
Destroy sync object.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, < 0 on failure.
| void MbimSyncObject_DoneCallback |
( |
uint32_t |
status, |
|
|
uint32_t |
transactionId, |
|
|
uint8_t * |
informationBuffer, |
|
|
uint32_t |
informationBufferLength, |
|
|
void * |
pDoneCallbackContext |
|
) |
| |
This funcion copies MBIM command response's informationBuffer to this object's informationBuffer and signals the waiting thread.
- Parameters
-
| [in] | status | MBIM status of the MBIM transaction. |
| [in] | transactionId | Transaction ID of associated MBIM transaction. |
| [in] | informationBuffer | Transaction response's informationBuffer. |
| [in] | informationBufferLength | Number of bytes in transaction response's informationBuffer. |
| [in] | pDoneCallbackContext | Pointer to this sync object. |
| int MbimSyncObject_Initialize |
( |
MbimSyncObject * |
pThis, |
|
|
uint8_t * |
informationBuffer, |
|
|
uint32_t |
informationBufferLength |
|
) |
| |
Initialize sync object.
- Parameters
-
| [in] | pThis |
- The primary object of this call.
|
| [in] | informationBuffer |
- Buffer to which the transaction response's informationBuffer will be copied.
|
| [in] | informationBufferLength |
- Maximum expected size in bytes of transaction response's informationBuffer.
|
- Returns
- 0 on success, < 0 on failure.
Lock sync object.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, < 0 on failure.
Signal sync object. Waiting thread should wake up.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, ETIMEDOUT on timeout, or other negative on failure.
| int MbimSyncObject_TimedWait |
( |
MbimSyncObject * |
pThis, |
|
|
time_t |
timeoutSeconds |
|
) |
| |
Block, waiting on sync object for a number of seconds.
- Parameters
-
| [in] | pThis | The primary object of this call. |
| [in] | timeoutSeconds | Timeout in seconds before abondoning wait. |
- Returns
- 0 on success, < 0 on failure.
Unlock sync object.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, < 0 on failure.
Block, waiting on sync object.
- Parameters
-
| [in] | pThis | The primary object of this call. |
- Returns
- 0 on success, < 0 on failure.